home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t8.d64
/
slither.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
4KB
|
121 lines
1 REM*'MUKADE 1.3' UPDATED,REVISED & *CONVERTED FROM VIC TO 64 BY
2 REM*BY ROGER D. BURGE, #2667,TORONTO *PET USERS GROUP,LONDON, ONT.CANADA
3 SC=PEEK(648)*256:CM=55296:CC=CM-SC:GOSUB4000:SV=54272
4 POKE53280,10:GOSUB2000
5 PRINT"[147]"
20 FORI=1TO4:GETG$:NEXT
30 P=0
50 E$=""
100 REM
105 POKE53281,1:PRINT"[147]":POKE53281,.
110 X=1 :Y=3
120 FORI=1TOM
130 X(I)=X:Y(I)=Y
140 NEXT
145 X1=10:Y1=-1
146 DEFFNA(Z)=-(ABS(PEEK(Z1)-PEEK(Z2))=G)*SGN(PEEK(Z1)-PEEK(Z2))
147 DEFFNB(Z)=-(ABS(PEEK(Z1)-PEEK(Z2))=F0)*SGN(PEEK(Z1)-PEEK(Z2))
148 ML=828:M2=879:M3=885:Z1=251:Z2=252:BS=32:G=1:DE=2:F0=40:HA=83
149 DEFFNC(A)=PEEK(SC+Y*F0+X-F0):POKE781,40:POKE782,.
150 POKE53265,PEEK(53265)AND239:GOSUB1000
155 GOSUB1100
157 GOSUB1200
160 S$="SCORE:":TA$="TARGETS"
161 PRINTS$P;TA$TS
205 FORI=GTOM:PRINTLEFT$(E$,Y(I))SPC(X(I))"[209]";:NEXT
210 SYSM3:SYSML:X=X+FNA(Z):Y=Y+FNB(A):SYSM2
280 IFFNC(A)=HATHENPOKES1,129:P=P+G:PRINTS$;P:GOTO300:REM**SOUND HEART
290 IFFNC(A)<>BSTHEN600
300 IFP=TSTHEN660
310 PRINTLEFT$(E$,Y(M))SPC(X(M))" ";
320 FORI=MTODESTEP-G
330 X(I)=X(I-G):Y(I)=Y(I-G):NEXT
340 X(G)=X:Y(G)=Y
500 GOTO205
600 IFP>HSTHENHS=P
650 IFP<TSTHEN690
660 SYSM3:FORT=.TO10:SYSM2:FORTT=1TO50:NEXT:SYSM3:POKE53280,T:NEXT
670 POKES1,128:PRINT" [158] YOU WIN! "
671 PRINT" [158] "
672 BO=INT((VAL(A$)/15+VAL(B$)/15)*P):P=P+BO
673 PRINT"[158]BONUS"BO"+ SCORE="P
674 IFP>HSTHENHS=P
675 PRINT"[158]HIGH [157][157][157][157][157]"HS
689 GOTO701
690 PRINT" [153] SORRY! ":GOSUB3000
691 PRINT" [153] "
692 PRINT"[153]HIGH SCORE"HS
701 PRINT" PLAY AGAIN? (Y/N) "
702 GETA$:IFA$=""THEN702
703 IFA$="Y"THENT2=1:GOTO2001
704 IFA$="N"THENPRINT"[147]":END
705 GOTO702
790 GOTO5
800 REM" CL*10+10
1000 [129]I[178].[164]CL[172]16[170]20
1040 A[178][187](.)[172]959
1041 GG[178][181]([187](.)[172]14)[170]1:[139]GG[178]10[167]1041
1060 [151]SC[170]A[170]F0,160
1070 [151]CM[170]A[170]F0,GG
1080 [130]:TS[178]CL[172]10[170]11
1081 [151]1105,86:[151]1105[170]CM[171]SC,G
1090 [142]
1100 [143]
1110 [129]I[178]SC[164]1063:[151]I,160:[151]I[170]CC,10:[151]I[170]960,160:[151]I[170]960[170]CC,10:[130]
1111 [153]" SLITHER V ";
1112 [153]"SPEED LEVEL:"A$;
1113 [153]" SKILL LEVEL:"B$""
1120 [129]I[178]1064[164]1904[169]F0:[151]I,160:[151]I[170]39,160:[151]I[170]CC,G:[151]I[170]39[170]CC,G:[130]
1190 [142]
1200 [151]53265,[194](53265)[176]16
1210 [129]I[178].[164]10[172]CL[170]10
1220 A[178][187](.)[172]959
1221 [139][194](A[170]SC[170]F0)[179][177]BS[167]1220
1230 [151]SC[170]A[170]F0,HA
1240 [151]CM[170]A[170]F0,10
1250 [130]
1260 [142]
2000 [134]X(12),Y(12)
2001 [153]"LOAD":[151]53281,1
2005 [153]" SLITHER V "
2010 BO[178]4:BA[178]4:WA[178]6:CL[178]4:M[178]3:[141]5000
2015 [153]" USE JOYSTICK #2 TO CONTROL THE MOVING SNAKE AND HELP HIM FIND HIS";
2016 [153]" VALENTINES ((null)).
2020 PRINT"[156]BUT DON'T TOUCH THE WALLS, THE BLOCKS OR YOURSELF!
2050 [153]"STOPSPEED LEVEL?"
2051 [153]"DEFSLOW (0<>9) FAST":[151]198,2
2060 [161]A$:[139]A$[178]""[167]2060
2061 [139]A$[179]"0"[176]A$[177]"9"[167]2060
2065 [153]"STOP"A$:[153]"PRINT#SKILL LEVEL?"
2066 [153]"EASY (0<>9) HARD":[151]198,.
2073 [161]B$:[139]B$[178]""[167]2073
2074 [139]B$[179]"0"[176]A$[177]"9"[167]2073
2078 [153]"STOP"B$:C$[178]A$[170]B$:AS[178][197](C$)
2079 M[178][181](AS[173]10):CL[178]AS[171](M[172]10):M[178]9[171]M
2080 [139]CL[177]9 [176] M[177]9 [167]2060
2090 [139]CL[179]0 [176] M[179]0 [167]2060
2099 [139]T2[178]1[167]M[178]M[170]2:[129]T[178].[164]1500:[130]:[137]5
2100 M[178]M[170]2:[129]T[178].[164]1500:[130]:[142]
3000 [151]54277,53:[151]54278,69:[151]54276,33:[151]54273,5:[151]54272,71:SV[178]54272
3001 [129]F[178]G[164]900:[130]:[151]SV[170]G,.:[151]SV,.:[151]SV[170]5,53
3010 [151]SV[170]6,69:[151]SV[170]4,33:[151]SV[170]G,3:[151]SV,244
3015 [129]F[178]G[164]900:[130]:[151]SV[170]4,.:[151]SV[170]G,.:[151]SV,.:[151]SV[170]5,53
3020 [151]SV[170]6,69:[151]SV[170]4,33:[151]SV[170]G,DE:[151]SV,163:[129]F[178]G[164]900
3030 [130]:[151]SV[170]4,.:[151]SV[170]G,.:[151]SV ,.::[142]
4000 [129]T[178]828[164]878:[135]A:[151]T,A:[130]:[143] JS ML
4010 [129]T[178]879[164]884:[135]A:[151]T,A:[130]:[143] BEEP OFF ML
4020 [129]T[178]885[164]890:[135]A:[151]T,A:[130]:[143] BEEP ON ML
4080 [131]173,.,220,41,15
4081 [131]201,7,208,7,162,2,160,1,76,106,3
4082 [131]201,13,208,7,162,80,160,40,76,106,3
4083 [131]201,11,208,7,162,.,160,1,76,106,3
4084 [131]201,14,208,4,162,.,160,40
4085 [131]134,251,132,252,96
4090 [131]169,16,141,4,212,96
4190 [131]169,17,141,4,212,96
4200 [142]
5000 [129]T[178]SV[164]SV[170]24:[151]T,.:[130]
5010 [151]SV[170]24,15:[151]SV[170]5,17:[151]SV[170]6,17
5020 [151]SV[170]1,28:[151]SV,.
5030 S1[178]54276:[142]